package View;

import home.Config;

import java.awt.Color;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class Info extends JDialog{
	
	private static final long serialVersionUID = 1061183815710696846L;
	
	private JPanel panel = new JPanel();
	
	private JLabel label = new JLabel();

	public Info(String id){
		
		this.setTitle("Info");
		
		this.setSize(684, 512);
		
		this.setLocation(350, 180);
		
		this.setIconImage(Clio.createImageIcon("images/trucco.png").getImage());
		
		this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		
		label.setForeground(Color.white);
		
		label.setFont(Config.getConfig().getFont().deriveFont((float)20));
		
		panel.setBackground(Config.getConfig().getMarrone());
		
		if (id.equals("ricerca")){
	
			label.setText("help ricerca");
			
		} else{
			
			if (id.equals("home")){
				
				label.setText("help home");
				
			} else{
				
				if (id.equals("ricercaAvanzata")){
				
					label.setText("help avanzata");
				
				} else{
					
					if (id.equals("profilo")){
					
						label.setText("help profilo");
					
					} else{
						
						if(id.equals("risultati")){
							
							label.setText("help risultati");
						
						} else{
							
							if (id.equals("video")){
								
								label.setText("help video");
								
							} else{
							
								label.setText("help errore");
							
							}
							
						}
						
					}
				}
				
			}
		}
		panel.add(label);
		
		this.getContentPane().add(panel);
	}
	
	public void mostraInfo(){
		
		this.setVisible(true);
		
	}
	
	

}
